import {NgModule} from '@angular/core';
import {RouterModule, Routes} from "@angular/router";
import {CrowdComponent} from "@crowd/crowd.component";
import {CrowdDetailsComponent} from "@crowd/crowd-details/crowd-details.component";
import {CrowdListComponent} from "@crowd/crowd-list/crowd-list.component";
import {Step1Component} from "@crowd/step-1/step-1.component";
import {Step2Component} from "@crowd/step-2/step-2.component";
import {Step3Component} from "@crowd/step-3/step-3.component";
import {LaunchResultComponent} from "@crowd/launch-result/launch-result.component";
import {CrowdProtocolComponent} from "@crowd/crowd-protocol/crowd-protocol.component";
import {DynamicManageComponent} from "@crowd/dynamic-manage/dynamic-manage.component";
import {DynamicIssueComponent} from "@crowd/dynamic-issue/dynamic-issue.component";
import {BuySkuComponent} from "@crowd/crowd-details/buy-sku/buy-sku.component";
import {MyCrowdComponent} from "@crowd/my-crowd/my-crowd.component";
import {AuthGuardService} from "@shared/service/auth-guard/auth-guard.service";


const routes: Routes = [
  {
    path: '',
    component: CrowdComponent,

    children: [
      {
        path: '',
        redirectTo: 'list',
        pathMatch: 'full',
      },
      {
        path: 'list',
        component: CrowdListComponent,
        data: {
          reusable: true,
          meta: {
            title: '众筹_体育众筹_专业体育服务众筹平台',
            keywords: '众筹,运动众筹,众筹平台,求苗众筹,赛事众筹',
            description: `求苗众筹只为全民服务的互联网体育众筹平台`,
          },
        },
      },
      {
        path: 'my-crowd',
        component: MyCrowdComponent,
      },
      {
        path: 'protocol',
        component: CrowdProtocolComponent,

      },
      {
        path: 'crowd-details',
        component: CrowdDetailsComponent,
      },
      {
        path: 'buy-sku',
        component: BuySkuComponent,
      },
      {
        path: 'step-1', // named by 陈文豪
        component: Step1Component
      },
      {
        path: 'step-2',
        component: Step2Component
      },
      {
        path: 'step-3',
        component: Step3Component
      },
      {
        path: 'launch-result',
        component: LaunchResultComponent
      },
      {
        path: 'dynamic-manage',
        component: DynamicManageComponent
      },
      {
        path: 'dynamic-issue',
        component: DynamicIssueComponent
      },
    ]
  },
];

@NgModule({
  imports: [
    RouterModule.forChild(routes)
  ],
  exports: [RouterModule]
})
export class CrowdRoutingModule {
}
